<!DOCTYPE html>
<html>
<head>
    <title>用户商品信息表</title>
	<#include "/header.html">
</head>
<body>
<style>
    th{
        text-align: center;
    }
</style>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div style="float: left">
                <input type="text" class="form-control" v-model="q.commodityName" placeholder="商品名称"/>
            </div>
            <div style="float: left">
                <input type="text" class="form-control" v-model="q.userId" placeholder="用户id"/>
            </div>
            <a class="btn btn-default" @click="query">查询</a>
			<#if shiro.hasPermission("sys:busercommodityinfo:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
<!--			<#if shiro.hasPermission("sys:busercommodityinfo:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>-->
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
                    <div class="form-group">
                        <div class="col-sm-2 control-label">商品名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="bUserCommodityInfo.commodityName" placeholder="商品名称"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">商品描述</div>
                        <div class="col-sm-10">
                            <textarea class="form-control" v-model="bUserCommodityInfo.commodityDesc" placeholder="商品描述" rows="4"> </textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">商品图片</div>
                        <div class="col-sm-10">
                            <img v-bind:src="bUserCommodityInfo.commodityImgUrl" width="200px" height="200px"></img>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">商品价格</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="bUserCommodityInfo.commodityPrice" placeholder="商品价格" readonly="readonly"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">商品原价</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="bUserCommodityInfo.originalCommodityPrice" placeholder="商品原价" readonly="readonly"/>
                        </div>
                    </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/busercommodityinfo.js?_${.now?long}"></script>
</body>
</html>